<template>
  <view class="demo-container">
    <!-- 基础用法 -->
    <view class="demo-block">
      <view class="demo-block__title">基础用法</view>
      <view class="demo-block__content">
        <fu-textarea
          v-model="value1"
          placeholder="请输入内容"
          :border="true"
        />
      </view>
    </view>
    
    <!-- 显示字数统计 -->
    <view class="demo-block">
      <view class="demo-block__title">显示字数统计</view>
      <view class="demo-block__content">
        <fu-textarea
          v-model="value2"
          :maxlength="100"
          show-word-limit
          placeholder="请输入内容"
        />
      </view>
    </view>
    
    <!-- 自动增高 -->
    <view class="demo-block">
      <view class="demo-block__title">自动增高</view>
      <view class="demo-block__content">
        <fu-textarea
          v-model="value3"
          auto-height
          placeholder="请输入内容"
        />
      </view>
    </view>
    
    <!-- 禁用状态 -->
    <view class="demo-block">
      <view class="demo-block__title">禁用状态</view>
      <view class="demo-block__content">
        <fu-textarea
          v-model="value4"
          disabled
          placeholder="请输入内容"
        />
      </view>
    </view>
    
    <!-- 无边框 -->
    <view class="demo-block">
      <view class="demo-block__title">无边框</view>
      <view class="demo-block__content">
        <fu-textarea
          v-model="value5"
          placeholder="请输入内容"
          :border="false"
        />
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      value1: '',
      value2: '',
      value3: '',
      value4: '这是一段禁用状态的文本',
      value5: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.demo-container {
  padding: 20rpx;
}

.demo-block {
  margin-bottom: 30rpx;
  
  &__title {
    margin-bottom: 20rpx;
    font-size: var(--fu-font-size-lg);
    color: var(--fu-text-color);
  }
  
  &__content {
    background-color: #fff;
    border-radius: var(--fu-radius-base);
    overflow: hidden;
  }
}
</style> 